package com.dk.test;

import com.dk.task.MyThread05;

/**
 * 测试插队线程
 */
public class Demo05 {
    public static void main(String[] args) throws InterruptedException {
        MyThread05 myThread05 = new MyThread05();
        Thread t1 = new Thread(myThread05, "自定义线程1");

        t1.start();
        // 将t1线程插队到当前线程（main）之前
        t1.join();

        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName() + "=" + i);
        }
    }
}
